1. Technical Field
The present invention relates to a system and method for state-based execution and recovery in a payment system. More particularly, the present invention relates to a system and method for using a state machine to track a payment operation's completed sub-tasks and continue execution, after a failure, at a point within the payment operation as to not duplicate the payment operation's previously completed sub-tasks.
2. Description of the Related Art
Software-based payment systems today rely upon common techniques to orchestrate financial transactions between external payment providers (e.g., credit card companies). These payment systems perform various jobs in order to successfully handle payment operations associated with an order. Payment operations include, but are not limited to, order processing, payment-related events, data management, transaction management, and error handling.
While performing a payment operation, a payment system may experience a failure do to reasons such as a lack of network connectivity or temporary payment processor downtimes. When a failure occurs in the middle of executing a payment operation, a challenge found is that the payment system has to re-execute the entire payment operation, regardless of whether the payment operation was almost complete.
In addition, the payment operation may have interacted with an external payment provider by sending financial transaction requests and receiving financial transaction results (e.g., validation, payment, etc,). In these cases, when the payment system re-executes a payment operation from the beginning, the payment operation sends duplicate financial transaction requests to the payment provider. A challenge found is that payment providers may not allow a payment system to “roll back” or cancel a financial transaction. Furthermore, a challenge found is that the payment system typically requires manual intervention in order to correct problems when a payment operation partially completes.
What is needed, therefore, is a system and method for executing a partially completed payment operation without re-executing previously completed payment operation steps.